package org.hs.phd.odi.tracking.ui;

import java.util.List;

import org.hs.phd.odi.tracking.tracker.Track;

import com.googlecode.javacv.cpp.opencv_core;
import com.googlecode.javacv.cpp.opencv_core.IplImage;

public class TrackingModel {

	private IplImage image;
	private List<Track> tracks;

	public synchronized void setImage(IplImage image) {
		if( this.image != null ){
            opencv_core.cvReleaseImage(this.image);
		}
		
		this.image = image;
	}

	public synchronized void setTracks(List<Track> tracks) {
		this.tracks = tracks;
	}

	public synchronized IplImage getImage() {
		return image;
	}

	public synchronized List<Track> getTracks() {
		return tracks;
	}

}
